package com.wangsd.web.sys.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Data
@Entity
@Table(name = "sys_dictionaries")
@ApiModel(value = "字典表", description = "字典表")
public class SysDictionaries implements Serializable {

    @ApiModelProperty(value = "id")
    @Id
    /*mybatis plus 自增主键*/
    @TableId(type = IdType.AUTO)
    /*jpa 生成自增策略*/
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

    @ApiModelProperty(value = "（逻辑删除）是否已删；0，未删，1，已删")
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    @ApiModelProperty(value = "字典名称")
    private String dicName;

    @ApiModelProperty(value = "字典key")
    private String dicKey;

    @ApiModelProperty(value = "字典值")
    private String dicValue;
}
